package com.hiwan.system.pojo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

import com.hiwan.system.common.persistence.BasePojo;

/**
 * 
 * Datetime ： 2012-11-20 上午10:16:17<br>
 * Title : MenuInfo.java<br>
 * Copyright : Copyright (c) 2012<br>
 * Company : HIWAN<br>
 * 
 * @author
 * 
 */
public class MenuInfo extends BasePojo implements Serializable{
	
	private static final long serialVersionUID = 1L;
	
	private String menuId;
	private String menuName;
	private String isLeaf;
	private String menuUrl;
	private String parentMenu;
	private int menuOrder;
	private String menuClass;
	private String permission;
	private List<MenuInfo> subMenus;

	public String getMenuId() {
		return menuId;
	}

	public void setMenuId(String menuId) {
		this.menuId = menuId;
	}

	public String getMenuName() {
		return menuName;
	}

	public void setMenuName(String menuName) {
		this.menuName = menuName;
	}

	public String getIsLeaf() {
		return isLeaf;
	}

	public void setIsLeaf(String isLeaf) {
		this.isLeaf = isLeaf;
	}

	public String getMenuUrl() {
		return menuUrl;
	}

	public void setMenuUrl(String menuUrl) {
		this.menuUrl = menuUrl;
	}

	public String getParentMenu() {
		return parentMenu;
	}

	public void setParentMenu(String parentMenu) {
		this.parentMenu = parentMenu;
	}

	public int getMenuOrder() {
		return menuOrder;
	}

	public void setMenuOrder(int menuOrder) {
		this.menuOrder = menuOrder;
	}

	@Override
	public String toString() {
		return "MenuInfo [menuId=" + menuId + ", menuName=" + menuName
				+ ", isLeaf=" + isLeaf + ", menuUrl=" + menuUrl
				+ ", parentMenu=" + parentMenu + ", menuOrder=" + menuOrder
				+ ", permission=" + permission
				+ ", subMenus=" + subMenus + "]";
	}

	public List<MenuInfo> getSubMenus() {
		return subMenus;
	}

	public void setSubMenus(List<MenuInfo> subMenus) {
		this.subMenus = subMenus;
	}

	public void addSubMenu(MenuInfo menu) {
		if (subMenus == null) {
			subMenus = new ArrayList<MenuInfo>();
		}
		subMenus.add(menu);
	}

	public String getMenuClass() {
		return menuClass;
	}

	public void setMenuClass(String menuClass) {
		this.menuClass = menuClass;
	}

	public String getPermission() {
		return permission;
	}

	public void setPermission(String permission) {
		this.permission = permission;
	}
}
